package com.jmp.sms;

import one.stand.enums.EnumUtil;

import java.util.Map;

public enum SmsEnum {
    login_sms(1, "登录", null),
    join_company(2, "登录", null),
    unread_msg(3, "未读消息提醒", null),
    jxsSign(4, "经销版注册通知短信(管理员）", "全景红木评选"),
    jxsTicketSave(5, "展销会订单提交通知短信(管理员）", "全景红木评选"),
    jxsSignSuccess(6, "客户经销版注册成功通知", "全景红木评选"),
    jxsSignFail(7, "客户经销版注册失败通知", "全景红木评选"),
    ;

    private Integer code;
    private String message;
    private String sign;

    SmsEnum(Integer code, String message, String sign) {
        this.code = code;
        this.message = message;
        this.sign = sign;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getSign() {
        return sign;
    }

    private static Map<Integer, SmsEnum> map = EnumUtil.getEnumMap(values(), SmsEnum::getCode);

    public static SmsEnum getByCode(Integer code) {
        return map.get(code);
    }
}
